package com.xique.park.controller.app;

import com.xique.common.core.web.domain.AjaxResult;
import com.xique.park.bean.request.app.ParkInAndOutListRequest;
import com.xique.park.bean.request.app.ParkInOutPicRequest;
import com.xique.park.service.biz.service.IParkInOutBizService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 在移动端进出记录controller
 *
 * @author xique
 */
@RestController
@RequestMapping("/app/parkInOut")
public class AppParkInOutController {

    @Autowired
    private IParkInOutBizService parkInOutBizService;

    /**
     * 查询进场和出场记录列表
     */
    @PostMapping("/list")
//    @PreAuthorize(hasPermi = "park:parkIn:list")
    public AjaxResult getParkInAndOutList(@Validated @RequestBody ParkInAndOutListRequest request) {
        return parkInOutBizService.getParkInAndOutList(request);
    }

    /**
     * 查看图片
     */
    @PostMapping("/getPic")
//    @PreAuthorize(hasPermi = "park:parkIn:query")
    public AjaxResult getPic(@Validated @RequestBody ParkInOutPicRequest request) {
        return parkInOutBizService.getPic(request);
    }

}
